﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="comment_list.aspx.cs" Inherits="He.Web.tools.comment_list" %>

<%
    int cid = He.Web.UI.InputUtil.Get("cid", 0);
    int pid = He.Web.UI.InputUtil.Get("pid", 0);
    int psize = 10;
    int page = He.Web.UI.InputUtil.Get("page", 0);
    int rcount;
    He.BLL.comment bll = new He.BLL.comment();
    string strWhere = "channel_id=" + cid + " and pid=" + pid + " and is_lock=0";
    System.Collections.Generic.List<He.Model.comment> CommentList = bll.GetModelList(psize, page, strWhere, "id asc");
    rcount = bll.GetRecordCount(strWhere);
    if (CommentList != null && rcount > 0)
    {
        foreach (He.Model.comment item in CommentList)
        {
%>
<li>
    <div class="title">
        <span>
            <%=item.add_time%></span><%=item.user_name%></div>
    <div class="box">
        <%=item.content%></div>
</li>
<% 
        }
%>
<%=He.Web.UI.HtmlHelper.OutPageList(psize, page, rcount,"javascript:void(AjaxPageList('#comment_list', __id__))")%>
<br style="clear: both">
<%
    }
    else
    {
        if (He.Web.UI.InputUtil.Get("lang").Equals("en"))
        {
%>
<p style="line-height: 35px;">
    No comments，Now comment！</p>
<%
        }
        else
        {
%>
<p style="line-height: 35px;">
    暂无评论，快来抢沙发吧！</p>
<%
        }
    }
%>
